<?php
/*
	Rss-aggregator php script : Aggregate rss feeds to display it as needed
	Visit http://www.rss-aggregator.com for more help.
	Copyright (C) 2008 DAHU.FR

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

	include('mesfonctions.php');
	
	global $connexion;
	
	$FLUid = $_REQUEST["IdFlux1"];
	
	$requete1 = "SELECT * FROM RSSAtag WHERE TAGfluxid = '".$FLUid."' ORDER BY TAGid";
	$resultat1 = mysql_query ($requete1, $connexion);
	if ($resultat1)
	{
		$requete2 = "SELECT * FROM RSSAflux WHERE FLUid = '".$FLUid."'";
		$resultat2 = mysql_query ($requete2, $connexion);
		if ($resultat2)
		{
			while ($flux = mysql_fetch_object ($resultat2))
			{
?>
<br />
<div class="intitule"> "<?php echo $flux->FLUnom; ?>" TAGS LIST : </div> <br />
<div id="ListeTag">
<?php
			}
		}
		
		while ($tag = mysql_fetch_object ($resultat1))
		{
?>
	<div id="Tag<?php echo $tag->TAGid; ?>">
		<table>
			<tr>
				<td width="200px"> <?php echo '- ', $tag->TAGtag; ?> </td>
				<td> <a href="javascript:supprimer_tag(<?php echo $tag->TAGid; ?>)" class="liens"> Delete </a> </td>
			</tr>
		</table>
	</div>
<?php			
		}
?>
</div>
<?php
	}
?>

<br /> <br />
<div>
	<div class="intitule"> ADD TAGS : </div>
	<br />
	<form>
		<label> Tags (comma separated) : <br />
		<input type="text" name="Tag" id="Tag" size="40" /> </label>
		<input type="button" name="AjouterTag" id="AjouterTag" value="Add" onclick="javascript:ajouter_tag(<?php echo $FLUid; ?>), Tag.value=''" />
	</form>
</div>
